<template>
	<view>
		<!-- <view class="top">
			<text class="top-text">报修系统</text>
			<view class="pthyBox">
				<text class="pthyBox-text">普通会员</text>
			</view>
		</view> -->
		<!-- <view class="two"></view> -->
		<view class="there">
			<view class="there-item">
				<view class="there-itemq">
					<text>单位：</text>
				</view>
				<view class="there-itemh">
					<text>科新机电</text>
				</view>
			</view>
			<view class="there-item">
				<view class="there-itemq">
					<text>用户ID：</text>
				</view>
				<view class="there-itemh">
					<text>{{userInfo.ID}}</text>
				</view>
			</view>
			<view class="there-item">
				<view class="there-itemq">
					<text>姓名：</text>
				</view>
				<view class="there-itemh">
					<text>{{userInfo.NAME}}</text>
				</view>
			</view>
			<!-- <view class="there-item">
				<view class="there-itemq">
					<text>用户组：</text>
				</view>
				<view class="there-itemh">
					<text>初创管理员</text>
				</view>
			</view> -->
			<view class="there-item">
				<view class="there-itemq">
					<text>手机号：</text>
				</view>
				<view class="there-itemh">
					<text>{{userInfo.PHONE}}</text>
				</view>
			</view>
			<!-- <view class="there-item">
				<view class="there-itemq">
					<text>注册时间：</text>
				</view>
				<view class="there-itemh">
					<text>2023-09-11 21:32</text>
				</view>
			</view> -->
		</view>
		<!-- <view class="four">
			<view class="four-item">
				<u-button class="rgzxBox-btn2" type="primary" color="limegreen">更新</u-button>
			</view>
			<view class="four-item">
				<u-button class="rgzxBox-btn2" type="primary" color="darkgoldenrod">管理用户</u-button>
			</view>
			<navigator url="../glyzrPages/glyzrPages">
			<view class="four-item">
				<u-button class="rgzxBox-btn2" type="primary" color="orangered">管理员转让</u-button>
			</view>
			</navigator>
			<navigator url="../zxzhPages/zxzhPages">
			<view class="four-item">
				<u-button class="rgzxBox-btn2" type="primary" color="crimson">注销</u-button>
			</view>
			</navigator>
		</view> -->
		<!-- <view class="lastBox">
			<text>报修软件购买电话：18850331555</text>
		</view> -->
		<!-- <button @click="getSwiper"></button> -->
			<view class="btn">
				<u-button style="width: 80%;background-color: red;color: white;" type="" @click="logout()">注销</u-button>	
			</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				swiperData: [],
				userInfo: {},
			}
		},
	   created() {
	        // this.getSwiper();
	    },
		onLoad() {
			console.log('onLoad')
			const value = uni.getStorageSync('userInfo')
			console.log(value);
			if (value) {
				this.userInfo = value
				console.log(this.userInfo);
			}else{
				console.log('未登录');
			}
		},
		methods: {
			// 删除图片
			logout() {
				uni.setStorageSync('userInfo',{})
				uni.reLaunch({url: '/pages/login/login'});
			},
		//  async getSwiper() {
		//             const res = await this.$api.home.getSwiper();
		//             if(res.meta.status == 200) {
		//                 this.swiperData = res.message;
		//             }
		//         }
		//     }
		}
	}
</script>

<style>
.top{
	height: 50rpx;
	background-color: #13d5f6;
	color: white;
	text-align: center;
	display: flex;
}
.top-text{
	margin-left: 280rpx;
}
.pthyBox{
	width: 130rpx;
	height: 50rpx;
	/* border: 1px solid red; */
	margin-left: 100rpx;
}
.pthyBox-text{
	font-size: 24rpx;
}
.two{
	height: 230rpx;
	background-color: aliceblue;
}
.there{
	
}
.there-item{
	height: 80rpx;
	line-height: 80rpx;
	border: 1px solid #f1f1f1;
	display: flex;
	margin-bottom: 25rpx;
}
.there-itemq{
	width: 180rpx;
	padding-left: 20rpx;
}s
.there-itemh{
	width: 555rpx;
}
.four{
	
}
.four-item{
	margin-top: 16rpx;
}
.rgzxBox-btn2{
	border-radius: 25rpx;
}
.lastBox{
	height: 90rpx;
	line-height: 90rpx;
	text-align: center;
	margin-top: 16rpx;
	background-color: #f1f1f1;
	color: gray;
}
</style>
